//
//  AXFLaunchCell.m
//  AIXF
//
//  Created by zhanghui on 2017/7/9.
//  Copyright © 2017年 Macx. All rights reserved.
//

#import "AXFLaunchCell.h"
#import "AXFTabBarController.h"

@interface AXFLaunchCell ()

@property (weak, nonatomic) IBOutlet UIImageView *adImageView;


@end

@implementation AXFLaunchCell

- (void)setImageName:(NSString *)imageName{
    
    _imageName = imageName;
    
    //设置模型属性赋值
    self.adImageView.image = [UIImage imageNamed:imageName];
}

- (IBAction)enterTabBarViewCtrAciton:(id)sender {
    
    //新特性界面只会存在一次
    NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
    
    [userDefault setBool:YES forKey:@"isAlreadyNew"];
    // 立即写入文件
    [userDefault synchronize];

    
    //切换跟控制器
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    
    //切换根控制器
    AXFTabBarController *tab = [[AXFTabBarController alloc]init];
    
    [window setRootViewController:tab];
    
    
    
    
    
}


@end
